package com.finiac.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="product_list")
public class Product {
		private int id;
		private String product;
		private int itemId;
		private float purchasePrice;
		private float sellingPrice;
		private float qtyAvail;
		private String dateLastPurchase;
		private String purchaseUnit;
		private int isActive;
		
		@Id
		@GeneratedValue
		@Column(name="id")
		public int getId() {
			return id;
		}
		public void setId(int id) {
			this.id = id;
		}
		@Column(name="product")
		public String getProduct() {
			return product;
		}
		public void setProduct(String product) {
			this.product = product;
		}
		@Column(name="item_id")
		public int getItemId() {
			return itemId;
		}
		public void setItemId(int itemId) {
			this.itemId = itemId;
		}
		@Column(name="purchase_price")
		public float getPurchasePrice() {
			return purchasePrice;
		}
		public void setPurchasePrice(float purchasePrice) {
			this.purchasePrice = purchasePrice;
		}
		@Column(name="selling_price")
		public float getSellingPrice() {
			return sellingPrice;
		}
		public void setSellingPrice(float sellingPrice) {
			this.sellingPrice = sellingPrice;
		}
		@Column(name="qty_avail")
		public float getQtyAvail() {
			return qtyAvail;
		}
		public void setQtyAvail(float qtyAvail) {
			this.qtyAvail = qtyAvail;
		}
		@Column(name="date_last_purchase")
		public String getDateLastPurchase() {
			return dateLastPurchase;
		}
		public void setDateLastPurchase(String dateLastPurchase) {
			this.dateLastPurchase = dateLastPurchase;
		}
		@Column(name="purchase_unit")
		public String getPurchaseUnit() {
			return purchaseUnit;
		}
		public void setPurchaseUnit(String purchaseUnit) {
			this.purchaseUnit = purchaseUnit;
		}
		@Column(name="is_active")
		public int getIsActive() {
			return isActive;
		}
		public void setIsActive(int isActive) {
			this.isActive = isActive;
		}
		public Product(String product, int itemId, float purchasePrice,
				float sellingPrice, float qtyAvail, String dateLastPurchase,
				String purchaseUnit) {
			this.product = product;
			this.itemId = itemId;
			this.purchasePrice = purchasePrice;
			this.sellingPrice = sellingPrice;
			this.qtyAvail = qtyAvail;
			this.dateLastPurchase = dateLastPurchase;
			this.purchaseUnit = purchaseUnit;
			this.isActive=1;
		}
		
		public Product(){}
}
